All Questions
10 questions
0votes
4answers
174views
Could you please recommend an approach on converting non-unique field to a unique field?
On our prod db we have two tables: companies invoices Relationship: A company has many invoices An invoice belong to a company The invoices table contains duplicate invoice_number for each company. ...
0votes
1answer
98views
Server load/capacity based on data structure
Using PHP, I created a chatbox, and I used an unorthodox way of storing chat messages in MySQL. The tbl_chat_messages has the following columns: id | sender_id | receiver_id | message | date The ...
0votes
3answers
1kviews
How to generate URLs for a custom URL shortener?
Due to some issues with other shorteners like goo.gl (disabling my links for example) I want to create my own URL shortener. I am looking to have a single table that will contain the following columns ...
0votes
1answer
122views
Use redundant data in database design when have multiple relation
In my web application users can submit their advertises and buy package for advertise (packages are used for priority of showing advertises) Database schema is like this: **Package: id, title, ...
2votes
1answer
143views
What should be the structure of a person to person store database?
I am going to create a person to person store with Laravel, a website where its users can share and sell their product or their mobile, TV, Computer, Shoes, Shirts, Books, Cars, Bags, Animal, etc. I ...
1vote
2answers
2kviews
Examples of designing a database that handles point tracking?
I'm attempting to expand my knowledge of how database designs and concepts work. I'm working on a hobby web/mobile app for practice that will challenge me. However, I am running into an issue. What ...
1vote
1answer
1kviews
Store data for multiple User Type
I am developing an app where four types of user share same module. So is it a good idea to create: one table and user_type and user_id (something like that) table prefixes basically 4 diff tables of ...
4votes
3answers
2kviews
Application Logic Vs DB Triggers for database cleaning
When cleaning out old data from a set of database tables, is it safer to have the logic in the application or in a database trigger? I am upgrading an application that I wrote a while back (and in a ...
1vote
2answers
140views
In which format should I sent the values in database in PHP?
I am developing an application which is based on the quiz contest for competetive exams. The user can give different categories of tests, which will contain different types of questions of following ...
1vote
1answer
329views
Is using dynamically generated code as cache a good idea?
I have a web search interface that can compare products in a table. This data set changes a few times a week. I have been storing a "DISTINCT" list (used for parametric selection) in a cache table. ...